package com.prj.ufdm.cloud.svr.config;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;

@SpringBootApplication
@EnableConfigServer
public class ConfigServerApplication implements EnvironmentAware {
	
    private static Environment env;
	
	@Override
	public void setEnvironment(Environment environment) {
		env = environment;
	}
	
	public static void main(String[] args) {
		SpringApplication.run(ConfigServerApplication.class, args); 
		System.out.println("\n Config Server " + env.getProperty("server.port") + " 启动成功........"); 
	}

}
